﻿<Window x:Class="FileExplorer.ToolWindowDemo"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:e="http://www.quickzip.org/Views/Explorer"
        xmlns:uc="http://www.quickzip.org/UserControls"
        xmlns:bc="http://www.quickzip.org/BaseControls"
        xmlns:conv="http://www.quickzip.org/Converters"
        xmlns:cal="http://www.caliburnproject.org"
        Title="ToolWindowTest" Height="300" Width="300">
    <Grid>
        <Grid.Resources>
            <conv:EntryModelToStringConverter x:Key="emts" />
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200" />
            <ColumnDefinition Width="5" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
       
        
        
        <AdornerDecorator x:Name="PART_DragDropAdorner" Grid.ColumnSpan="3" />

        <uc:Explorer x:Name="explorer" Mode="ToolWindow" />
        <GridSplitter ResizeDirection="Columns" 
                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                      ResizeBehavior="PreviousAndNext" Grid.Column="1" />
        <StackPanel Orientation="Vertical" VerticalAlignment="Stretch" Grid.Column="2">
            <bc:UIEventAdapter.Processors>
                <bc:DragDropLiteEventProcessor />
            </bc:UIEventAdapter.Processors>
            <TextBlock Text="CurrentDirectory" FontWeight="Bold" />
            <!--ViewModel.FileList.Selection.SelectedItems is IEntryModel-->
            <TextBlock Text="{Binding ViewModel.FileList.CurrentDirectory, 
                Converter={StaticResource emts},
                ElementName=explorer}" />
            
            <TextBlock Text="Selection" FontWeight="Bold" />
            <!--ViewModel.FileList.Selection.SelectedItems is List<IEntryViewModel>-->
            <TextBlock Text="{Binding ViewModel.FileList.Selection.SelectedItems, 
                Converter={StaticResource emts},
                ElementName=explorer}" />
            
            <TextBlock Text="Drop Target" FontWeight="Bold" />
            <TextBlock x:Name="testDroppable" 
                   AllowDrop="True"
                   Text="{Binding Label}" >
              <bc:UIEventAdapter.Processors>
                <bc:DragDropEventProcessor EnableDrag="false" EnableDrop="true" />
                <bc:DragDropLiteEventProcessor EnableDrag="false" EnableDrop="true"
                                               EnableMouse="False" EnableTouch="True" />
              </bc:UIEventAdapter.Processors>

            </TextBlock>
        </StackPanel>
    </Grid>
</Window>
